package com.zygh.policeasset.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.zygh.policeasset.mapper.RoleMapper;
import com.zygh.policeasset.pojo.Role;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
/* loaded from: police-asset-2.0-0.0.1-SNAPSHOT.jar:BOOT-INF/classes/com/zygh/policeasset/service/RoleService.class */
public class RoleService {
    @Autowired
    private RoleMapper roleMapper;

    public PageInfo findAllRole(int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        return new PageInfo<>(this.roleMapper.findAllRole());
    }

    public Integer addRole(Role role) {
        return this.roleMapper.addRole(role);
    }

    public Integer updateRole(Role role) {
        return this.roleMapper.updateRole(role);
    }

    public Integer deleteRole(int id) {
        return this.roleMapper.deleteRole(id);
    }

    public String findById(int id) {
        return this.roleMapper.findById(id);
    }

    public Role findRoleById(int id) {
        return this.roleMapper.findRoleById(id);
    }
}